﻿@namespace BootstrapBlazor.Components
@typeparam TValue
@inherits CheckboxList<TValue>

@if (IsShowLabel)
{
    <BootstrapLabel required="@Required" ShowLabelTooltip="ShowLabelTooltip" Value="@DisplayText" />
}
<div @attributes="@AdditionalAttributes" class="@GetClassString(RadioClassString)">
    @foreach (var item in Items)
    {
        var content = GetChildContent(item);
        <Radio TValue="SelectedItem" IsButton="IsButton" Value="@item" Color="@Color" GroupName="@GroupName" IsDisabled="@IsDisabled" ShowAfterLabel="true" ShowLabel="false" DisplayText="@item.Text" State="@CheckState(item)" OnClick="OnClick" ChildContent="content!" />
    }
</div>
